package com.asiainfo.work.constant;

/**
 * @author: bf
 * @date: 2021/1/11-10:41
 * 用户团队枚举
 */
public enum UserTeamEnum {

    /**
     * 每个平台和对应id
     */
    PLATFORM(1, "平台"),
    CUT_CONNECTION(2, "割接"),
    HOME(3, "家客"),
    XA_WM(4, "西安管线"),
    HB_WM(5, "湖北管线");

    private int teamId;
    private String teamName;

    public int getTeamId() {
        return teamId;
    }

    public void setTeamId(int teamId) {
        this.teamId = teamId;
    }

    public String getTeamName() {
        return teamName;
    }

    public void setTeamName(String teamName) {
        this.teamName = teamName;
    }

    UserTeamEnum(int teamId, String teamName) {
        this.teamId = teamId;
        this.teamName = teamName;
    }

    public static String getTeamValue(Integer id) {
        UserTeamEnum[] userTeamEnums = values();
        for (UserTeamEnum userTeamenum : userTeamEnums) {
            if (userTeamenum.teamId == id) {
                return userTeamenum.getTeamName();
            }
        }
        return null;
    }
}